//
//  WelcomeViewController.m
//  坦克大战
//
//  Created by 宗大丞 on 16/5/24.
//  Copyright © 2016年 Zong. All rights reserved.
//

#import "WelcomeViewController.h"
#import "ViewController.h"
#import "CoolVideoViewController.h"

@interface WelcomeViewController ()

@end

@implementation WelcomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initUI];
}

- (void)initUI {
    
    self.view.backgroundColor = [UIColor blackColor];
    
    CGFloat width = self.view.frame.size.width;
    
    UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, width, width)];
    imgView.center = self.view.center;
    imgView.image = [UIImage imageNamed:@"welcome"];
    [self.view addSubview:imgView];
    
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    [self dismissViewControllerAnimated:YES completion:nil];
    [self.viewController restart];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
